package PrintStream;

import java.io.IOException;
import java.io.PrintStream;

/**
 * @author 王艺锡
 * @version 1.0
 * 字节流
 * PrintStream
 * OutputStream的子类
 *
 */
public class PrintStream_ {
    public static void main(String[] args) throws IOException {
        //默认输出设备是显示器
        PrintStream out = System.out;
        out.println("hello");
        out.write("王艺锡".getBytes());
        out.close();

        //可以修改打印输出的位置
        //修改输出位置到e:\f1.txt
        System.setOut(new PrintStream("e:\\f1.txt"));
        System.out.println("泡芙");

    }
}
